package cn.wolfcode.luowowo.common.util;


import lombok.Getter;
import lombok.Setter;

@Getter
public enum RedisKeys {

    VERIFY_CODE("verify_code",Consts.VERIFY_CODE_VAI_TIME*60), USERINFO_TOKEN("user",Consts.USER_INFO_TOKEN_VAI_TIME *60),STRATEGY_STATICS_VO("strategy_statics_vo",-1);
   @Setter
    private String key;
   @Setter
    private Integer timeout;
    RedisKeys(String name,Integer timeout){
       this.key=name;
       this.timeout=timeout;
   }

   public String getNewKey(String... strings) {
       String original = this.getKey();
       StringBuilder sb=new StringBuilder(50);
       sb.append(original);
       for (String string : strings) {
           sb.append(":").append(string);
       }
       return sb.toString();
   }


}
